feat(goose): standardize agent-session-id for session correlation#6626
Merged
codefromthecrypt merged 1 commit intomainfrom Jan 22, 2026
Merged
feat(goose): standardize agent-session-id for session correlation#6626codefromthecrypt merged 1 commit intomainfrom
codefromthecrypt merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes session correlation from goose-session-id/GOOSE_SESSION_ID to agent-session-id/AGENT_SESSION_ID, enabling MCP servers and LLM gateways to support goose without hardcoding agent-specific identifiers.
Changes:
- Updated session ID header constant from
"goose-session-id"to"agent-session-id" - Renamed environment variable from
GOOSE_SESSION_IDtoAGENT_SESSION_IDacross all shell configurations - Updated test replay files to use the new
agent-session-idfield in MCP metadata
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/goose/src/session_context.rs | Updated SESSION_ID_HEADER constant from "goose-session-id" to "agent-session-id" |
| crates/goose-cli/src/commands/term.rs | Updated shell configurations (bash, zsh, fish, powershell) to export AGENT_SESSION_ID and updated error messages referencing the environment variable |
| crates/goose/tests/mcp_replays/uvxmcp-server-fetch | Updated test replay to use agent-session-id in MCP _meta field |
| crates/goose/tests/mcp_replays/npx-y@modelcontextprotocol_server-everything | Updated test replay to use agent-session-id in MCP _meta field |
| crates/goose/tests/mcp_replays/github-mcp-serverstdio | Updated test replay to use agent-session-id in MCP _meta field |
| crates/goose/tests/mcp_replays/cargorun--quiet-pgoose-server--bingoosed--mcpdeveloper | Updated test replay to use agent-session-id in MCP _meta field |
Signed-off-by: Adrian Cole <adrian@tetrate.io>
3a9556f to
35a7b04
Compare
michaelneale
approved these changes
Jan 22, 2026
katzdave
added a commit
that referenced
this pull request
Jan 22, 2026
…ovider * 'main' of github.com:block/goose: PR Code Review (#6043) fix(docs): use dynamic import for globby ESM module (#6636) chore: trigger CI Document tab completion (#6635) Install goose-mcp crate dependencies (#6632) feat(goose): standardize agent-session-id for session correlation (#6626) chore: tweak release docs (#6571) fix(goose): propagate session_id across providers and MCP (#6584)
wpfleger96
added a commit
that referenced
this pull request
Jan 22, 2026
* main: (68 commits) fix(docs): use dynamic import for globby ESM module (#6636) chore: trigger CI Document tab completion (#6635) Install goose-mcp crate dependencies (#6632) feat(goose): standardize agent-session-id for session correlation (#6626) chore: tweak release docs (#6571) fix(goose): propagate session_id across providers and MCP (#6584) increase worker threads for ci (#6614) docs: todo tutorial update (#6613) Added goose doc map md file for goose agent to find relevant doc easily. (#6598) add back goose branding to home (#6617) fix: actually set the working dir for extensions from session (#6612) Multi chat (#6428) Lifei/fixed accumulated token count (#6587) Dont show MCP UI/Apps until tool is approved (#6492) docs: max tokens config (#6596) User configurable templates (#6420) docs: http proxy environment variables (#6594) feat: exclude subagent tool from code_execution filtering (#6531) Fix path for global agent skills (#6591) ...
wpfleger96
added a commit
that referenced
this pull request
Jan 22, 2026
* main: (68 commits) fix(docs): use dynamic import for globby ESM module (#6636) chore: trigger CI Document tab completion (#6635) Install goose-mcp crate dependencies (#6632) feat(goose): standardize agent-session-id for session correlation (#6626) chore: tweak release docs (#6571) fix(goose): propagate session_id across providers and MCP (#6584) increase worker threads for ci (#6614) docs: todo tutorial update (#6613) Added goose doc map md file for goose agent to find relevant doc easily. (#6598) add back goose branding to home (#6617) fix: actually set the working dir for extensions from session (#6612) Multi chat (#6428) Lifei/fixed accumulated token count (#6587) Dont show MCP UI/Apps until tool is approved (#6492) docs: max tokens config (#6596) User configurable templates (#6420) docs: http proxy environment variables (#6594) feat: exclude subagent tool from code_execution filtering (#6531) Fix path for global agent skills (#6591) ...
wpfleger96
added a commit
that referenced
this pull request
Jan 22, 2026
* main: (68 commits) fix(docs): use dynamic import for globby ESM module (#6636) chore: trigger CI Document tab completion (#6635) Install goose-mcp crate dependencies (#6632) feat(goose): standardize agent-session-id for session correlation (#6626) chore: tweak release docs (#6571) fix(goose): propagate session_id across providers and MCP (#6584) increase worker threads for ci (#6614) docs: todo tutorial update (#6613) Added goose doc map md file for goose agent to find relevant doc easily. (#6598) add back goose branding to home (#6617) fix: actually set the working dir for extensions from session (#6612) Multi chat (#6428) Lifei/fixed accumulated token count (#6587) Dont show MCP UI/Apps until tool is approved (#6492) docs: max tokens config (#6596) User configurable templates (#6420) docs: http proxy environment variables (#6594) feat: exclude subagent tool from code_execution filtering (#6531) Fix path for global agent skills (#6591) ...
lifeizhou-ap
added a commit
that referenced
this pull request
Jan 22, 2026
* main: docs: ml-based prompt injection detection (#6627) Strip the audience for compacting (#6646) chore(release): release version 1.21.0 (minor) (#6634) add collapsable chat nav (#6649) fix: capitalize Rust in CONTRIBUTING.md (#6640) chore(deps): bump lodash from 4.17.21 to 4.17.23 in /ui/desktop (#6623) Vibe mcp apps (#6569) Add session forking capability (#5882) chore(deps): bump lodash from 4.17.21 to 4.17.23 in /documentation (#6624) fix(docs): use named import for globby v13 (#6639) PR Code Review (#6043) fix(docs): use dynamic import for globby ESM module (#6636) chore: trigger CI Document tab completion (#6635) Install goose-mcp crate dependencies (#6632) feat(goose): standardize agent-session-id for session correlation (#6626)
10 tasks
fbalicchia
pushed a commit
to fbalicchia/goose
that referenced
this pull request
Jan 23, 2026
…ock#6626) Signed-off-by: Adrian Cole <adrian@tetrate.io> Signed-off-by: fbalicchia <fbalicchia@cuebiq.com>
This was referenced Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch session correlation from
goose-session-id/GOOSE_SESSION_IDtoagent-session-id/AGENT_SESSION_ID.This enables MCP servers and LLM gateways to add goose support without implying they need to hard-code every agent.
This comes out of a discussion in MCP gateway interest group where the most important correlation after otel is the agent session id.
While not all things call this "session", ACP does and that gives over a dozen agents a vocab mapping.
For us, all it means is s/goose/agent/g
Once merged, I'll update Envoy AI Gateway goose+otel example from goose-session-id -> agent-session-id.
Type of Change
AI Assistance
Testing
just updates to test data